package lsysteem;

public class LSStack {

	public LSStackItem stack = null;
	
	public void push(LSLine item){
		if (null == stack){
			stack = new LSStackItem(item, null);
		}
		else {
			stack = new LSStackItem(item, stack);
		}
		
		
	}
	
	public LSLine pop(){
		//If stack = empty;
		if (null == stack){
			return null;
		}
		else{
			LSLine temp = stack.value;
			stack = stack.next;
			return temp;
		}
	}
}
